package com.smasher.update.api

import com.smasher.net.http.HttpUtil
import com.smasher.update.entity.BaseDataContainer
import com.smasher.update.entity.BeanVersion
import kotlinx.serialization.InternalSerializationApi

class Api {
    /**
     * 获取版本信息
     * @since version 3.0.0
     */
    @OptIn(InternalSerializationApi::class)
    suspend fun getVersion(url: String, id: String, code: Long): BaseDataContainer<BeanVersion> {
        return HttpUtil.getInstance().createWithKotlin(KirovService::class.java)
            .getVersion(url, id, code)
    }
}
